/**
 * 放映厅的操作
 * */

import base from '@/plugins/baseURL'; // 导入接口域名列表
import axios from '@/plugins/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 参数转化

const hall={
    searchHallByCon(params){
        return axios.post(`${base.dev}/hall/searchHall`,qs.stringify(params));
    },
    searchHallType(){
        return axios.post(`${base.dev}/hall/searchHallType`);
    },
    searchCinemaByName(cinemaName){
        let data = {
            cinemaName: cinemaName,
        };
        return axios.post(`${base.dev}/cinema/searchCinemaByName`,qs.stringify(data));
    },
    deleteHallById(hallId){
        let data = {
            hallId: hallId,
        };
        return axios.post(`${base.dev}/hall/removeHall`,qs.stringify(data));
    },
    addHallFormData(formData){
        let config = {
            headers: {
                "Content-Type": "application/json"
            }
        };

        return axios.post(`${base.dev}/hall/addHall`,formData,config);
    },
    updateHallFormData(formData){
        let config = {
            headers: {
                "Content-Type": "application/json"
            }
        };
        return axios.post(`${base.dev}/hall/updateHall`,formData,config);
    },

}

export default hall;